#include "qmladapter.h"
#include "cookingdata.h"
#include "qtquick2applicationviewer.h"
QmlAdapter::QmlAdapter(QObject *parent) :
    QObject(parent)
{
    CookingData* CD = new CookingData;
    QtQuick2ApplicationViewer* viewer = new QtQuick2ApplicationViewer;
 //   viewer->addImportPath("D:/sasha/qt51/5.1.1/mingw48_32/qml");
    QQmlContext* cntx = viewer->engine()->rootContext();
    cntx->setContextProperty("CD",CD);

    viewer->setMainQmlFile(QStringLiteral("qml/main.qml"));
    viewer->showExpanded();
}
